package com.boco.pciv.tasks;

import com.boco.pciv.service.sys.IUserOnlineService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by CC on 2017/9/12.
 * 在线用户清理
 */
@Component
public class OnlineUserClear {
//logger
private static final Logger logger = LoggerFactory.getLogger(OnlineUserClear.class);
    @Autowired
    IUserOnlineService srv;

    @Scheduled(fixedRate=600000)
    public void userClear(){
        logger.debug("start OnlineUserClear....");
        srv.deleteOverTime();
    }
}
